<template>
	<div class="cvu-empty">
        <div class="cvu-empty-img">
            <img :src="image" alt="" :style="{ 'width': `${imageSize}px` }">
        </div>
        <div class="cvu-empty-description" v-if="description">
            <p>{{ description }}</p>
        </div>
        <slot />
    </div>
</template>

<script>
export default {
    name: 'cvu-empty',
    props: {
        // 自定义图片
        image: {
            type: String,
            default: ''
        },
        // 图片大小
        imageSize: {
            type: Number,
            default: 200
        },
        // 描述
        description: {
            type: String,
            default: '暂无数据'
        }
    },
    data() {
        return {}
    },
    watch: {},
    methods: {}
}
</script>

<style lang="scss" scoped>
@import '../../../style/_index.scss';
.cvu-empty{
    width: 100%;
    text-align: center;
    padding: 5vh 0;
    .cvu-empty-image{
        width: 100%;
        margin: 0 auto 10px auto;
    }
    .cvu-empty-description{
        width: 100%;
        line-height: 25px;
        font-size: 12px;
        color: #909399;
    }
}
</style>
